import layerSvc from "./service/layerSvc";
class LayerINTF {
    constructor(canvas) {
        this.m_pCanvas = canvas;
        this.m_pService = new layerSvc.LayerSvc(canvas.getDataManager());
    }

    getAllLayerData(){
        return this.m_pService.getAllLayerData();
    }
    newLayer(newLayerInfo){
        this.m_pService.newLayer(newLayerInfo);
    }
    
    setCurent(name){
        this.m_pService.setCurent(name);
    }
    
    delLayer(name){
        this.m_pService.delLayer(name);
        this.m_pCanvas.rePaint(1);
    }
    
    setAllDisplay(disflag){
        this.m_pService.setAllDisplay(disflag);
        this.m_pCanvas.rePaint(1);
    }
    
    selAllGraphInLayer(name){
        this.m_pService.selAllGraphInLayer(name);
        this.m_pCanvas.rePaint(1);
    }
    
    setLayerOrder(name,kind){
        this.m_pService.setLayerOrder(name,kind);
        this.m_pCanvas.rePaint(1);
    }

    setLayerShow(name,visible){
        this.m_pService.setLayerShow(name,visible);
        this.m_pCanvas.rePaint(1);
    }

    lockLayer(name,lock){
        this.m_pService.lockLayer(name,lock);
        this.m_pCanvas.rePaint(1);
    }

    
    
}

export default { LayerINTF }